<div style="font-size: 125%; padding: 10px 0px 2px 2px; ">
{$kateg.blcNazwa}
</div>
<p style=" font-size: 80%; padding: 0px 0px 10px 2px; border-bottom: dotted 1px #fff;">{$kateg.blcOpis}</p>
{if $archiwum eq 1 }<a href="{$smarty.const.HTTP_URL}{$smarty.request.page},,wyswietlWpisy,{$kateg.blcID}.html">Zobacz aktualne wpisy...</a>{/if}
{if $archiwum ne 1 }<a href="{$smarty.const.HTTP_URL}{$smarty.request.page},,archiwum,{$kateg.blcID}.html">Zobacz archiwalne wpisy...</a>{/if}
<div id="accordion-wpisy" >
{section name=id loop=$wpisy}

	<div class="lista-wpisow-bloga" style="margin-top: 10px;">
		<div class="wpis-temat"><a href="#"  title="{$wpisy[id].blwTemat|wordwrap:17:" ":true|html2text}">{$wpisy[id].blwTemat|wordwrap:17:" ":true|default:$wpisy[id].blwID}</a></div>
		<div class="wpisy-data">{$wpisy[id].blwData|date_format_:"%A, %B %e, %Y godz.:%H:%M:%S"}</div>
		
		<div class="wpisy-lid" {if $smarty.section.id.index eq 0 }style="display: none;"{/if}>
		{if isset($settings_blog.lista_zdjec_liczba_znakow_opisu)}
			{$wpisy[id].blwWpis|default:'...'|truncate:$settings_blog.lista_zdjec_liczba_znakow_opisu|wordwrap:17:" ":true|html2text}
		{else}
			{$wpisy[id].blwWpis|default:'...'|truncate:400|wordwrap:25:" ":true|html2text}
		{/if}		
		</div>		

	</div>
	<div class="conntent-wpisu" style="margin-bottom: 20px; padding: 10px 3px 10px 3px;">
		{if $uprawnienia eq 1}
		<div class="wpisy-tools">
			<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},,edytujWpis,{$wpisy[id].blcID},{$wpisy[id].blwID},{$wpisy[id].blwTemat|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_edit.gif"  title="Edytuj treśc wpisu"  alt="edit"></a>
			<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},Blog,wpisUp,{$wpisy[id].blcID},{$wpisy[id].blwID},{$wpisy[id].blwTemat|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_up.gif"  title="Do przodu"  alt="up"></a>
			<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},Blog,wpisDown,{$wpisy[id].blcID},{$wpisy[id].blwID},{$wpisy[id].blwTemat|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_down.gif"  title="Do tyłu"  alt="down"></a>
			<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},Blog,zablogujWpisBloga,{$wpisy[id].blcID},{$wpisy[id].blwID},{$wpisy[id].blwStatus},{$wpisy[id].blwTemat|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_{if $wpisy[id].blwStatus eq 0}un{/if}lock.gif"  title="{if $wpisy[id].blwStatus eq 0}Zablokuj{else}Odblokuj{/if} wpis"  alt="lock"></a>
			<a style="float:left; cursor: pointer;" onclick="$('#pytanie-text-{$wpisy[id].blwID}').dialog();" ><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_delete.gif"  title="Usuń wpis z bloga"  alt="del"></a>
			<!-- help -->
			<div id="pytanie-text-{$wpisy[id].blwID}" style="display: none;" title="Czy usunąc wpis z bloga">
				
				<p>Czy napewno usunąc wpis z bloga: {$wpisy[id].blwTemat|wordwrap:17:" ":true|default:$wpisy[id].blwID}</p>
				<br/>
				<input type="button" value="Tak" onclick="document.location='{$smarty.const.HTTP_URL}{$smarty.request.page},Blog,usunWpisBloga,{$wpisy[id].blcID},{$wpisy[id].blwID},{$wpisy[id].blwTemat|frendlyurl}.html';"/>
				<input type="button" value="Nie" onclick="$('#pytanie-text-{$wpisy[id].phID}').dialog( 'destroy' );"/>
			</div>
			<!-- /help -->	
		</div>
		{/if}

		{$wpisy[id].blwWpis|default:'...'}
		
		{assign var=separ value=';'}
		{assign var='komID' value=$wpisy[id].blwID}
		{dispatcher->handleEvent v=Komentarze,index,Blog$separ$komID}
	</div>	

{/section}
</div>
<script type="text/javascript">
	//<![CDATA[

	$(function() {ldelim}
		$("#accordion-wpisy").accordion({ldelim} 
			header: ".lista-wpisow-bloga",
			autoHeight: false,
			collapsible: true,
			icons: {ldelim} 'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' {rdelim}
		{rdelim});
		

	
	{rdelim});
		
	$(document).ready(function(){ldelim}
		var border_color='';
		var background_color='';
		$(".lista-wpisow-bloga").mouseover(function(){ldelim}
			border_color = $(this).css("border-color");
			background_color = $(this).css("background-color");
			$(this).css("border-color","#00ff00");
			$('.wybierz-adres-url',this).css("display","block");
		{rdelim}).mouseout(function(){ldelim}
			$(this).css("border-color",border_color);
			$('.wybierz-adres-url',this).css("display","none");
		{rdelim});	

		$('#accordion-wpisy').bind('accordionchange', function(event, ui) {ldelim}
		  ui.newHeader // jQuery object, activated header
		  ui.oldHeader // jQuery object, previous header
		  ui.newContent // jQuery object, activated content
		  ui.oldContent // jQuery object, previous content
		  ui.oldContent.hide('slow');
		  $('.wpisy-lid',ui.newHeader).css("display","none");
		  $('.wpisy-lid',ui.oldHeader).css("display","block");
		  
		  $(ui.oldHeader).css("background-color",$(ui.newHeader).css("background-color"));		  
		  $(ui.newHeader).css("background-color","#588ab3");

		  
		{rdelim});
	

	{rdelim});
	//]]>
</script>

